﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Services="clr-namespace:SharpF2.Services"
    mc:Ignorable="d"
	x:Class="SharpF2.View.Options"
	Title="Options"
    SizeToContent="WidthAndHeight"
    WindowStartupLocation="CenterOwner"
    ResizeMode="NoResize" ShowInTaskbar="False" WindowStyle="ToolWindow"
    Background="{StaticResource MainBackgroundBrush}">
    <Window.Resources>
        <Services:LanguageService x:Key="languageService"/>
    </Window.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="41"/>
		</Grid.RowDefinitions>
        <StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="350" Margin="8">
            <GroupBox Header="{Services:Language LanguageTitle}">
                <ComboBox Grid.Row="1" Grid.Column="1" Margin="8,8,8,2"
                      IsSynchronizedWithCurrentItem="True" 
                      HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      ItemsSource="{Binding AvailableCultures, Source={StaticResource languageService}}"
                      SelectedItem="{Binding UICulture, Source={StaticResource languageService}}"
                      DisplayMemberPath="NativeName"/>
            </GroupBox>
        </StackPanel>
		<Button Grid.Row="1" 
                Margin="0,0,8,8" 
                Padding="10,4"
                MinWidth="100"
                MinHeight="24"
                VerticalAlignment="Bottom" 
                HorizontalAlignment="Right"
                Content="Ok" 
                Grid.Column="1" 
                IsDefault="True" 
                IsCancel="True"/>
	</Grid>
</Window>